using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ASPXBuilderDemo
{
    public partial class MainForm : Form
    {
        private string selectedControl;
        List<Object> objetos = new List<Object>();

        public MainForm()
        {
            InitializeComponent();
        }

        private void salirToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            // Salir
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            selectedControl = toolStripButton1.Text;
        }

        private void tabPage1_Click(object sender, EventArgs e)
        {
            switch (selectedControl)
            {
                case "TextBox":
                    PintarTexBox();
                    break;
                case "Button":
                    // NADA
                    break;
            }
            selectedControl = "";
        }

        private void PintarTexBox()
        {
            TextBoxControl.TextBoxControl myText = new TextBoxControl.TextBoxControl();
            myText.Location = new Point(Cursor.Position.X - Left - tabControl1.Location.X, Cursor.Position.Y - Top - tabControl1.Location.Y);
            tabPage1.Controls.Add(myText);

        }

       
    }
}